Grouping repeated data with Algolia’s Distinct feature, by merging records into distinct groups, aggregating results, and flattening hierarchies.
company
.
attributeForDistinct
and enabling distinctdistinct
you first need to set company
as attributeForDistinct
during indexing time. Only then can you set distinct
to true
to deduplicate your results.
Note that setting distinct
at indexing time is optional. If you want to, you can set it at query time instead.
attributeForDistinct
is set, you can enable distinct
by setting it to true
. Note that you can set distinct
to true
or 1
interchangeably. If you wanted to show the three best positions for one company, you could set distinct
to 3
.